<%@ page language="java" import="java.util.*"
	import="java.security.MessageDigest" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<html>
	<head>
		<base href="<%=basePath%>">
		<title>My JSP 'index.jsp' starting page</title>
	</head>
	<body>
		This is my JSP page !
		<br>
		<%
			String revStr = request.getParameter("getMd5");
			if (revStr != null) {
				MessageDigest md = MessageDigest.getInstance("MD5");
				byte[] array = md.digest(revStr.getBytes("utf-8"));
				StringBuffer sb = new StringBuffer();
				for (int i = 0; i < array.length; i++) {
					sb.append(Integer.toHexString((array[i] & 0xFF) | 0x100)
							.toUpperCase().substring(1, 3));
				}
				out.print(sb.toString() + "<BR>");
			} else {
				out
						.print("You can calc Md5 for string by 'getMd5' param !<BR>");
			}
			out.print(new java.util.Date() + "<BR>");
			System.out.print(new java.util.Date() + "\r\n");
		%><br>
		<applet
			codebase="D:\Server\apache-tomcat-6.0.18\webapps\web\WEB-INF\classes\"
			code="higkoo.web.Applet.class" name="Applet" width="320" height="240">
			<!--<param name="p0" value="">
          <param name="p1" value="">-->
		</applet>
	</body>
</html>
